package cn.gengar.domain.trade.adapter.repository;

import cn.gengar.domain.trade.model.aggregate.GroupBuyOrderAggregate;
import cn.gengar.domain.trade.model.aggregate.GroupBuyTeamSettlementAggregate;
import cn.gengar.domain.trade.model.entity.GroupBuyActivityEntity;
import cn.gengar.domain.trade.model.entity.GroupBuyTeamEntity;
import cn.gengar.domain.trade.model.entity.MarketPayOrderEntity;
import cn.gengar.domain.trade.model.valobj.GroupBuyProgressVO;

public interface ITradeRepository {

    MarketPayOrderEntity lockMarketPayOrder(GroupBuyOrderAggregate groupBuyOrderAggregate);

    GroupBuyProgressVO queryGroupBuyProgress(String teamId);

    MarketPayOrderEntity queryMarkerPayOrderByOutTradeNo(String userId, String outTradeNo);

    Integer queryOrderCountByActivityId(String userId, Long activityId);

    GroupBuyActivityEntity queryGroupBuyActivityByActivityId(Long activityId);

    GroupBuyTeamEntity queryGroupBuyTeamByTeamId(String teamId);

    boolean settlementMarketPayOrder(GroupBuyTeamSettlementAggregate groupBuyTeamSettlementAggregate);
}
